#pragma once

#include <windows.h>
#include <fstream>
#include <vector>
#include <queue>

#include "TimelineEvent.h"
#include "ITimelineSubject.h"

class Timeline : ITimelineSubject
{
private:
	std::queue<TimelineEvent*> events;
	std::vector<ITimelineObserver*> observers;

	TimelineEvent *nextEvent;

public:
	Timeline(void);
	~Timeline(void);

	void LoadFromFile(const char *filename);
	void ProcessTime(int time);

	void RegisterObserver(ITimelineObserver *observer);
	void UnregisterObserver(ITimelineObserver *observer);
};
